Fix assertions in bitops.c.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 22 Oct 2005 06:43:56 +0000 (07:43 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 22 Oct 2005 06:43:56 +0000 (07:43 +0100)
Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>

xen/arch/x86/bitops.c

index 695a609a2397c78eca87cf759ee7decbd81d7168..639d82d8303b5d25a50bdbed1bddd2e345748552 100644 (file)
@@ -29,7 +29,7 @@ unsigned int __find_next_bit(
     const unsigned long *p = addr + (offset / BITS_PER_LONG);
     unsigned int set, bit = offset & (BITS_PER_LONG - 1);
 
-    ASSERT(offset < size);
+    ASSERT(offset <= size);
 
     if ( bit != 0 )
     {
@@ -78,7 +78,7 @@ unsigned int __find_next_zero_bit(
     const unsigned long *p = addr + (offset / BITS_PER_LONG);
     unsigned int set, bit = offset & (BITS_PER_LONG - 1);
 
-    ASSERT(offset < size);
+    ASSERT(offset <= size);
 
     if ( bit != 0 )
     {